﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using com.vs.General;
using com.vs.General.RF;

namespace com.vs.RF.Web.inventory
{
    public partial class LocationInquiryResultHandling : RFHandlingPage
    {
        private string stAction = null;
        private int iIndex = 0;

        protected void Page_Load(object sender, EventArgs e)
        {

            stSourcePage = "inventory/LocationInquiryResult.aspx";
            stTargetPage = "inventory/LocationInquiryResult.aspx";

            go();
        }

        protected override void parseRequest()
        {
            stAction = Request["hdAction"];
        }

        protected override void procData()
        {
            /*
            int index=0;
            if (Session["LOCATION_INQ_ITEM_PAGE_INDEX"] != null)
                index = (int)Session["LOCATION_INQ_ITEM_PAGE_INDEX"];

            string hdBaseQty = Request["hdBaseQty"];
            if (hdBaseQty == "Prev")
            {
                index = index -1;
                
                DataTable dt = (DataTable)Session["LOCATION_INQ_ITEM_RESULT"];
                Session["LOCATION_INQ_ITEM_RESULT_PAGE"]=dt.Rows[index];
            }
            else if (hdBaseQty == "Next")
            {
                index = index +1;
                DataTable dt = (DataTable)Session["LOCATION_INQ_ITEM_RESULT"];
                Session["LOCATION_INQ_ITEM_RESULT_PAGE"] = dt.Rows[index];
            }
            */


            iIndex = (int)Session["INV_RESULT_INDEX"];
            if (StringManager.Equals(stAction, "Prev"))
            {
                iIndex--;
            }
            if (StringManager.Equals(stAction, "Next"))
            {
                iIndex++;
            }
            Session["INV_RESULT_INDEX"] = iIndex;
        }
    }
}
